<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!doctype html>

<html lang="en"><head>
    <meta charset="utf-8">
    <title></title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

 <script src="${pageContext.request.contextPath}/jquery.bootstrap.min.js"></script>
</head>
<body class=" theme-blue">
<script type="text/javascript">



$(document).ready(function(){
	$("#message").delay(1500).slideUp("normal");
	
	$("#user").click(function(){
		$.confrim({
		    title: 'Confirm!',
		    content: 'Confirm! Confirm! Confirm!',
		    confirm: function(){
		        alert('the user clicked confirm');
		    },
		    cancel: function(){
		        alert('the user clicked cancel')
		    }
		});
	});
	
});
	

	function isDelete(){
		if(window.confirm("Are you sure delete?"))
			
			return true;
		else{
			return false;
		}
			
	}
</script>

<div class="content">
<c:if test="${not empty message}">
    <div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
</c:if>


        <div class="header">
            
            <h1 class="page-title">Teachers</h1>
                    <ul class="breadcrumb">
            <li><a href="index.html">Home</a> </li>
            <li class="active">teacher</li>
        </ul>

        </div>
        <div class="main-content">
  
  <div class="search-well">
                <form class="form-inline" method="post" style="margin-top:0px;" action="${pageContext.request.contextPath }/tea/search">
                    <input class="input-xlarge form-control" placeholder="Search Help..." id="appendedInputButton" name="searchTip" value="${searchTip }" type="text">
                    <button class="btn btn-default" type="submit"><i class="fa fa-search"></i> Go</button>
                </form>
            </div>
            
<div class="btn-toolbar list-toolbar">
    <button class="btn btn-primary"><i class="fa fa-plus"></i> <a href="${pageContext.request.contextPath}/tea/add">New Teacher</a></button>
    <button class="btn btn-default"><a href="${pageContext.request.contextPath }/upload">Import</a></button>
    <button class="btn btn-default">Export</button>
  <div class="btn-group">
  </div>
</div>




<table  class="table-striped  table table-bordered ">
  <thead>
    <tr>
      <th id="user"><spring:message code="tea.examTeacherId"/></th>
      <th><spring:message code="tea.examTeacherName"/></th>
      <th><spring:message code="tea.examTeacherNumber"/></th>
      <th><spring:message code="tea.examTeacherPassword"/></th>
      <th style="width: 3.5em;" colspan="2"><spring:message code="website.operator"/></th>
    </tr>
  </thead>
  <tbody>
   <c:forEach items="${page.datas }" var="tea"> 
	<tr>
		<td>${tea.examTeacherId }</td>
		<td>${tea.examTeacherName }</td>
		<td>${tea.examTeacherNumber }</td>
		<td>${tea.examTeacherPassword }</td>
		<td><a onclick="return isDelete()" href="${pageContext.request.contextPath}/tea/delete/${tea.examTeacherId }" id="del"  role="button" data-toggle="modal"> <i class="fa fa-trash-o"></i></a>
		&nbsp;<a href="${pageContext.request.contextPath}/tea/edit/${tea.examTeacherId}"><i class="fa fa-pencil"></i></a>
			
		</td>
	</tr>
	</c:forEach>  
	
	
	<tr>
		<td colspan="5">
			<jsp:include page="/common/page.jsp">
				<jsp:param value="teacherList" name="url"/>
				<jsp:param value="${page.totalSize }" name="items"/>
				<jsp:param value="${page.pageSize }" name="pageSize"/>
			</jsp:include>
		</td>
	</tr>
  </tbody>
</table>


    
  
</body></html>
